<?php

require_once(realpath(dirname(__FILE__)."/../vendor/php-ofc-library/open-flash-chart.php"));
require_once(realpath(dirname(__FILE__)."/../vendor/php-ofc-library/open_flash_chart_object.php"));


/**
 * 
 *
 */
class ofChartFactory extends graph 
{
	
	/**
	 * display swf chart object
	 *
	 * @param int $width
	 * @param int $height
	 * @param string $url
	 */
	public static function display($width, $height, $url)
	{
		
		open_flash_chart_object(
		 $width, 
		 $height, 
		  url_for($url), false, 
		  str_replace(".png", "", image_path('/ofChartPlugin/'))
		);
	}
	
	
	/**
	 * create graph instance
	 *
	 * @return ofChartFactory
	 */
	public static function createInstance()
	{
		
		return new self();
	}
	
	
}

